﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace SDSystem.Models
{
    class NewsValidate
    {
        [StringLength(255, ErrorMessage = "Name must contain least 50 characters", MinimumLength = 50)]
        [Required]
        [DisplayName("Name")]
        public String Name { get; set; }

        [StringLength(255, ErrorMessage = "Tag must contain least 50 characters", MinimumLength = 50)]
        [Required]
        [DisplayName("Tag")]
        public String Tag { get; set; }

        [StringLength(255, ErrorMessage = "Name must contain least 50 characters", MinimumLength = 50)]
        [Required]
        [DisplayName("Title")]
        public String Title { get; set; }

        [Required]
        [DisplayName("Date Create")]
        public DateTime DateCreate { get; set; }

        [StringLength(255, ErrorMessage = "Name must contain least 5 characters", MinimumLength = 5)]
        public String Keyword { get; set; }

        public int Views { get; set; }
    }
}
